<template>
  <el-form :model="data" ref="form" :rules="rules">
    <el-form-item label="菜单名称" prop="name">
      <el-input v-model="data.name"/>
    </el-form-item>
  </el-form>
</template>

<script>
  export default {
    name: "forms",
    props: {
      data: Object
    },
    data() {
      return {
        rules: {
          name: {
            required: true,
            message: "请输入名称"
          }
        }
      };
    },
    methods: {
      get() {
        return this.$refs.form;
      }
    }
  };
</script>

<style scoped>

</style>
